package com.com.day05;

import java.applet.Applet;
import java.applet.AudioClip;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;

public class job_Music {

        public File f;
        public URI uri;
        public URL url;
    AudioClip audio;

        public job_Music(){

        }
        public void m(){
            f=new File("y.wav");
            uri=f.toURI();
            try {
                url=uri.toURL();
            } catch (MalformedURLException e) {
                e.printStackTrace();
                audio= Applet.newAudioClip(url);
                //循环播放
                audio.loop();
            }
            System.out.println("sjasa");
        }
    }

